package com.xrz.sxm.aj.activity;

import android.widget.ListView;

import com.lidroid.xutils.view.annotation.ViewInject;
import com.xrz.sxm.aj.adapter.DrawerAdapter;
import com.xrz.sxm.aj.base.BaseAct;
import com.xrz.sxm.aj.entity_tab.DBHelps;

import java.util.ArrayList;
import java.util.List;

public class DianXinganliActivity extends BaseAct {
	@ViewInject(R.id.anli_listview)
	private ListView mListView;
	private DrawerAdapter adapter;
	private List<String> datas = new ArrayList<String>();
	public static final int ANLITYPT = 1;

	private DBHelps m_DbHelps;
	@Override
	protected int setView() {
		return R.layout.layout_dianxinganli;
	}

	@Override
	protected void init() {
		m_DbHelps = new DBHelps(ctx);
		initData();
		adapter = new DrawerAdapter(this, datas, ANLITYPT);
		mListView.setAdapter(adapter);
	}

	private void initData() {
		datas.clear();
		datas.addAll(m_DbHelps.getAnLiDatas());
	}

	@Override
	protected String setTopTitle() {
		return "典型案例";
	}

	@Override
	protected boolean topHide() {
		return false;
	}
}
